package erfgame.frontend.desktop.controller;

import java.util.ArrayList;
import java.util.Collection;

public class AbstractController {
	private Collection<ControllerCompletionListener> completionListeners = new ArrayList<ControllerCompletionListener>();
	
	protected void fireControllerCompleted() {
		for( ControllerCompletionListener listener : this.completionListeners ) {
			listener.controllerCompleted( this );
		}
	}
	
	public void addControllerCompletionListener( ControllerCompletionListener listener ) {
		this.completionListeners.add( listener );
	}
	
	public void removeControllerCompletionListener( ControllerCompletionListener listener ) {
		this.completionListeners.remove( listener );
	}
	
	public void close() {
		
	}
}
